<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		   <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		   <link rel="stylesheet" type="text/css" href="css/animate.css"/>
           <meta name="author" content="Zhang Cheng">
		<title></title>
		<style>
			/*入场使用bounceIn，离场使用bounceOut*/
			
		</style>
		<script src="js/vue.js" ></script>
	</head>
	<body>
		<div id="app">
			<!--
            	需求：点击按钮让h3显示 再点击让他隐藏
            -->
            <input type="button"  value="按钮" @click="flag=!flag"/>
			<!--
            	使用transition 把需要 动画控制的元素包裹起来
            -->
            <!--
            	transition元素 vue 提供的元素
            -->
            <!--
            
            <transition enter-active-class="animated bounceIn" leave-active-class="animated bounceOut">
                <h3 v-if='flag'>这是一个h3</h3>
            
            </transition>
            -->
            <!--
            	:duration css3属性，控制入场和离场时间
            	 <transition enter-active-class="bounceIn" leave-active-class="bounceOut" :duration='250'>
	                <h3 v-if='flag' class="animated">这是一个h3</h3>
	            
	            </transition>
            -->
            
            <!--
            	:duration="{enter:250,leave:100}" css3属性，传一个对象分别设置入场和离场时间
            	
            -->
            <transition enter-active-class="bounceIn" leave-active-class="bounceOut" :duration="{enter:250,leave:100}">
                <h3 v-if='flag' class="animated">这是一个h3</h3>
            
            </transition>
           
		</div>
		<script>
			var app = new Vue({
				el:'#app',
				data:{
					flag:false,
				},
				methods:{
					
				}
			});
		</script>
	</body>
</html>